SMBv1 Protocol
Check SMBv1
| # Local
Get-WindowsFeature FS-SMB1
# Remote
Get-ADComputer -Filter {OperatingSystem -Like "Windows *Server*2012*" -or OperatingSystem -Like "Windows *Server*2016*" -and Enabled -eq $true} | % {icm -cn $_.Name -EA 0 {get-smbserverconfiguration | select PSComputerName,enableSMB1Protocol}}
|
Disable SMBv1
| # Local
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol
# Remote
Get-ADComputer -Filter {OperatingSystem -Like "Windows *Server*2012*" -or OperatingSystem -Like "Windows *Server*2016*" -and Enabled -eq $true} | % {icm -cn $_.Name -EA 0 { Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol -norestart}}
|
Enable SMBv1
| # Local
Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol
# Remote
Get-ADComputer -Filter {OperatingSystem -Like "Windows *Server*2012*" -or OperatingSystem -Like "Windows *Server*2016*" -and Enabled -eq $true} | % {icm -cn $_.Name -EA 0 { Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol}}
|
Note
You must restart the computer after you make these changes.